#include <stdio.h>

int main()
{
    int n,i,cnt = 0;
    float Math,Chinese,English,avg;

    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%f",&Math);
        scanf("%f",&Chinese);
        scanf("%f",&English);
        avg = (Math+Chinese+English)/3;
        if(avg<60) cnt++;
    }

    printf("%d\n",cnt);
    return 0;
}
